<template>
  <div>
    <button @click='f'>改child1的color</button>
  </div>
</template>
<script>
// @ is an alias to /src
export default {
  name: "XXX",
  data() {
    return {
      name: "child2",
    };
  },
  created() {
    // setInterval(() => {
    //   this.$parent.flag++;
    // }, 1000);
    console.log(this.dv);
  },
  methods: {
    f() {
      this.dv.$emit("qqqq", "blue");
      this.$root.type = 666;
      this.dv.age = 9999;
    },
  },
};
</script>
<style lang="less">
</style>